<?php
/**
 * RUBIK Solution & IT Development ltd.
 *
 * PROJECT		: Towing Auctions
 * COPYRIGHT	: 2010
 * ------------------------------------------------------
 * 
 * [GENERAL INFO OF THIS FILE] 
 *
 * @author			haunhp <haunhp@rubik.com.vn>
 * @package			[package name]
 *
 * Created on	: Oct 07, 2010
 */

// no direct access
defined ( '_FW_EXEC' ) or die ( 'Restricted access' );

/**
 * Type for bid_status field of bids table
 */
class CURRENCY {
	/**
	 * 
	 * US dollar
	 * Abbr: USD
	 */
	public static $USD 					= 'USD';
	/**
	 * 
	 * EURO
	 * Abbr: EUR
	 */
	public static $EURO					= 'EUR';
	/**
	 * 
	 * Japanese yen
	 * Abbr: JPY
	 */
	public static $JAPAN_YEN 			= 'JPY';
	/**
	 * 
	 * Frankc
	 * Abbr: FRC
	 */
	public static $FRANKC 				= 'FRC';
	/**
	 * 
	 * Great British Pound
	 * Abbr: GBP
	 */
	public static $GREAT_BRITISH_POUND 	= 'GBP';
	
	/**
	 * 
	 * Generate the currency sign
	 * 
	 * @param string $currencyCode: Currency code: USD, EURO, JPY, FRC, GBP
	 */
	public static function buildSign($currencyCode) {
		$result = '';
		switch ($currencyCode) {
			case 'EURO':
				$result = '&euro;';
				break;
			case 'GBP':
				$result = '&pound;';
				break;
			case 'JPY':
				$result = '&yen;';
				break;
			case 'FRC':
				$result = '&#8355;';
				break;
			default:
				$result = '$';
				break;
		}
		return $result;
	}
}